package com.atguigu.boot.config;

import com.atguigu.boot.pojo.MyBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnJava;
import org.springframework.boot.system.JavaVersion;
import org.springframework.context.annotation.Bean;

/**
 * spring-boot
 * 2022/9/13 20 59
 */
//这里没有写Config注解
public class MyBeanConfig {
    @Bean
    @ConditionalOnJava (value = JavaVersion.EIGHT,range = ConditionalOnJava.Range.EQUAL_OR_NEWER)
    public MyBean myBean(){
        return new MyBean (5,"MyBean11");
    }
}
